[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FGET IEXP,VAR

 Function
  Get (read) a line from the open file associated with channel IEXP
  and assign it to VAR.

 Syntax
  FGET chan,var

   chan  - An integer expression with the channel to read from
           (0 through 7).
   var   - The variable into which to read the next line from chan.

 Remarks
  This statement is to be used for reading information, a line at a time,
  from a file that was previously opened with read access.  If there are
  multiple items of information on the line then you must parse them out
  manually.

 Examples
  INTEGER i
  STRING  s
  FOPEN 1,"FILE.DAT",O_RD,S_DW
  IF (FERR(1)) THEN
   PRINTLN "Error, exiting..."
   END
  ENDIF
  FGET 1,s
  WHILE (!FERR(1)) DO
   INC i
   PRINTLN "Line ",RIGHT(i,3),":  ",s
   FGET 1,s
  ENDWHILE
  FCLOSE 1

See Also: FPUT/FPUTLN FPUTPAD
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson